//
//  TTCouponsPopView.m
//  TaoTuo
//
//  Created by admin on 2019/12/6.
//  Copyright © 2019 admin. All rights reserved.
//

#import "TTCouponsPopView.h"
#import <UIView+TYAlertView.h>
#import <UIImageView+WebCache.h>

@interface TTCouponsPopView ()

@property (weak, nonatomic) IBOutlet UIImageView *headerImageView;

@property (weak, nonatomic) IBOutlet UILabel *moneyLabel;

@end

@implementation TTCouponsPopView

- (void)awakeFromNib
{
    [super awakeFromNib];
    
    self.headerImageView.layer.cornerRadius = 30;
    self.headerImageView.layer.masksToBounds = YES;
    
}

- (void)setHeaderImageWithUrl:(NSString *)urlString money:(NSString *)money
{
    [self.headerImageView sd_setImageWithURL:[NSURL URLWithString:urlString] placeholderImage:[UIImage imageNamed:@"header_img"] options:SDWebImageRetryFailed];
    
    NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@ 元", money]];
    [attr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:30] range:[attr.string rangeOfString:money]];
    self.moneyLabel.attributedText = attr;
    
}


- (IBAction)closeBtnClick:(id)sender {
    
    [self hideInWindow];
    
}


@end
